/* 自定义全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 为了确保移动端体验 */
@media (max-width: 640px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* 移动端优化图表高度 */
    #paymentRankingChart {
        height: 300px !important;
    }
}

/* 图表响应式样式 */
@media (max-width: 640px) {
    #performanceRankingChart, #paymentRankingChart {
        height: 300px !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #performanceRankingChart, #paymentRankingChart {
        height: 350px !important;
    }
}

@media (min-width: 1025px) {
    #performanceRankingChart, #paymentRankingChart {
        height: 400px !important;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 确保图表容器有足够高度 */
#payment-content .card-shadow {
    position: relative;
}

/* 图表容器样式 */
#paymentRankingChart {
    max-width: 100%;
    height: auto;
}

/* 修复表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

tr {
    border-bottom: 1px solid #f0f0f0;
}

th, td {
    padding: 12px 0;
}

th {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

td {
    font-size: 14px;
    color: #333;
}

.ranking-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    padding: 16px;
}

.ranking-bar {
    display: flex;
    align-items: center;
    padding: 10px 0;
    position: relative;
}

.bar-rank {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-right: 12px;
}

.bar-region {
    flex: 0 0 120px;
    color: #ffffff;
    font-size: 14px;
}

.bar-progress-container {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 0 12px;
}

.bar-progress {
    height: 100%;
    background: linear-gradient(90deg, #4361ee 0%, #3a0ca3 100%);
    border-radius: 12px;
    transition: width 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.bar-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.bar-percentage {
    font-size: 14px;
    color: #ffffff;
    min-width: 60px;
    text-align: right;
}

/* 前三名特殊样式 */
.ranking-bar:nth-child(1) .bar-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
}

.ranking-bar:nth-child(2) .bar-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
    color: #000000;
}

.ranking-bar:nth-child(3) .bar-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
    color: #ffffff;
}

.ranking-bar:nth-child(1) .bar-progress {
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
}

.ranking-bar:nth-child(2) .bar-progress {
    background: linear-gradient(90deg, #C0C0C0 0%, #A9A9A9 100%);
}

.ranking-bar:nth-child(3) .bar-progress {
    background: linear-gradient(90deg, #CD7F32 0%, #A0522D 100%);
}

/* 区域人员详情页全屏样式 */
#region-detail-content {
    animation: fadeIn 0.3s ease-out;
}

#back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#back-button:hover {
    background-color: #f3f4f6;
}

#region-detail-title {
    color: #1F2937;
    margin: 0;
}

/* 人员卡片样式优化 */
#salesperson-list .card-shadow {
    transition: transform 0.2s, box-shadow 0.2s;
}

#salesperson-list .card-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 进度条样式优化 */
#salesperson-list .bg-primary {
    transition: width 1s ease-in-out;
}

/* 移动端优化 */
@media (max-width: 640px) {
    #salesperson-list .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    #region-detail-title {
        font-size: 1.1rem;
    }
    
    #region-detail-content .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}